import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: ()=>import('../views/Login.vue')
  },
  {
    path: '/regist',
    name: 'Regist',
    component:()=>import('../views/Regist.vue')
  
  },
  {
    path: '/',
    name: 'Home',
    component: ()=>import('../views/Home.vue'),
    children:[
      {
        path:'/article/list',
        name:'Home',
        component:()=>import('../views/ArticleList.vue')
      },
      {
        path:'/article/edit/:id?',
        name:'Home',
        component:()=>import('../views/ArticleEdit.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
